package org.yn.exception;

/**
 * 用来定义所有的响应码
 */
public enum ResponseCode {

    RESPONSE_CODE_200(200,"操作成功!"),
    RESPONSE_CODE_400(400,"参数类型异常!"),
    RESPONSE_CODE_40010(40010,"参数非空异常!"),

    RESPONSE_CODE_40011(40011,"密码不一致,请检查后重新输入!"),
    RESPONSE_CODE_40012(40012,"该店铺名称已存在,请重新输入!"),

    RESPONSE_CODE_40013(40013,"没有选中数据，不能上架"),
    RESPONSE_CODE_40014(40014,"没有选中数据，不能下架"),
    RESPONSE_CODE_40015(40015,"选择的数据都不满足上架的条件!"),
    RESPONSE_CODE_40016(40016,"输入的验证码不正确!"),

    RESPONSE_CODE_40017(40017,"验证码已过期!"),
    RESPONSE_CODE_40018(40018,"手机号码已经注册!"),
    RESPONSE_CODE_40019(40019,"请勿频繁发送手机验证码!"),
    RESPONSE_CODE_40020(40020,"手机验证码错误!"),
    RESPONSE_CODE_40021(40021,"用户名或邮箱已存在，请重新输入!"),
    RESPONSE_CODE_40023(40023,"账号或密码错误!"),
    RESPONSE_CODE_40024(40024,"该用户已经存在!"),
    RESPONSE_CODE_403(403,"没有操作权限!"),

    RESPONSE_CODE_412(412,"链接已失效！"),
//    412 （未满足前提条件） 服务器未满足请求者在请求中设置的其中一个前提条件。

    RESPONSE_CODE_500(500,"网络异常,请刷新重试!");

    private Integer code;
    private String message;

    ResponseCode() {
    }

    ResponseCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
